package com.study.mall;

public class Forth {
    private static int[] a = {1,2,3,4};
    private static int[] b = new int[3];
    public static void main(String[] args) {
        C(3,4);
    }

    private static void C(int m, int n) {
        int i, j;
        for (i = m; i <= n; i++) {
            b[m - 1] = i - 1;
            if (m > 1) {
                C(m - 1, i - 1);
            } else {
                for (j = 0; j < 3; j++) {
                    System.out.print(a[b[j]] + " ");
                }
                System.out.println();
            }
        }
    }
}
